package cn.wolfcode.mapper;

import cn.wolfcode.domain.Menu;
import cn.wolfcode.qo.MenuQueryObject;
import cn.wolfcode.qo.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MenuMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Menu record);

    Menu selectByPrimaryKey(Long id);

    List<Menu> selectAll();

    int updateByPrimaryKey(Menu record);

    List<Menu> queryAll(MenuQueryObject qo);

    List<Menu> selectMainMenu(int i);

    List<Menu> selectChildren(Long pId);

    void changeState(@Param("state") int state, @Param("id") Long id);
}